package manage_model

// 后台管理员表
type ManageUser struct {
	ID            uint   `json:"id" gorm:"autoIncrement;primaryKey;not null;comment:后台用户id"`
	Username      string `json:"username" gorm:"index;not null;comment:用户名"` // 必填
	Password      string `json:"password" gorm:"not null;comment:密码"`        // 必填
	Avatar        string `json:"avatar" gorm:"comment:头像"`
	Nickname      string `json:"nickname" gorm:"comment:昵称"`
	Fullname      string `json:"fullname" gorm:"comment:姓名"`
	Phone         string `json:"phone" gorm:"comment:电话"`
	Department    string `json:"department" gorm:"comment:部门"`
	Position      string `json:"position" gorm:"comment:职位"`
	BelongingRole string `json:"belonging_role" gorm:"comment:所属角色"`
	Status        uint   `json:"status" gorm:"not null;comment:状态"`
	IsSuper       uint   `json:"is_super" gorm:"not null;comment:是否为超级管理员<1 true, 0 false>"`
	RoleId        uint   `json:"role_id" gorm:"not null;comment:角色ID"`
	CreateTime    int64  `json:"create_time" gorm:"autoCreateTime;comment:创建时间"`
	UpdateTime    int64  `json:"update_time" gorm:"autoUpdateTime;comment:更新时间"`
}

func (ManageUser) TableName() string {
	return "gv_manage_user"
}
